home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / DEC2BASX.HDR < prev    next >
Text File  |  1994-04-25  |  865b  |  43 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Dec2BaseX( nNum, nBase ) --> cBaseNumString
  8.  
  9. PARAMETERS:
  10.  
  11. nNum  : Numeric Decimal value
  12. nBase : Base to convert nNum to
  13.  
  14. SHORT:
  15.  
  16. Convert a decimal integer to any other base in the range 1...72.
  17.  
  18. DESCRIPTION:
  19.  
  20. _Dec2BaseX() converts decimal numeric values to any other base in the range
  21. 1 -> 72.
  22.  
  23. NOTE:
  24.  
  25. See CAUTIONS under _BaseX2BaseY()!
  26.  
  27. EXAMPLE:
  28.  
  29. #define HEX 16
  30. #define OCT 8
  31. #define BIN 2
  32.  
  33. t = _Dec2BaseX(100,BIN)
  34. Result: t = "1100100"
  35.  
  36. t = _Dec2BaseX(100,OCT)
  37. Result: t = "144"
  38.  
  39. t = _Dec2BaseX(100,HEX)
  40. Result: t = "64"
  41.  
  42. ******************************************************************************/
  43.